package com.fh.modules.dbms.controller;

import com.fh.common.api.vo.Result;
import com.fh.common.aspect.annotation.AutoLog;
import com.fh.common.constant.CommonConstant;
import com.fh.modules.dbms.service.DbSourceService;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author qiujunda
 * @Date 22/12/2019
 * @Description
 */
@RestController
@RequestMapping("/dbms/dbSource")
@Slf4j
public class DbSourceController {

    @Autowired
    private DbSourceService dbSourceService;

    @GetMapping(value = "/list")
    @ApiOperation("查询所有数据源")
    @AutoLog(value = "查询所有数据源", logType = CommonConstant.LOG_TYPE_QUERY)
    public Result queryAll(){
        return Result.ok(dbSourceService.queryAllDbSource());
    }

}
